﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.OleDb;

public partial class Login : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {

        //string username = this.tb_username.Text.Trim();
        //string password = this.tb_password.Text.Trim();

        //string getCmd = "select count(*) as Num from setting where SuserName='" + username + "' and SpassWord='" +cyly.Md5(password,32) + "'";

        //AccessDatabase ad = new AccessDatabase();
        //OleDbDataReader reader = ad.ExeSql(getCmd);
        //if (reader.Read())
        //{
        //    if (Convert.ToInt32(reader["Num"]) == 1)
        //    {
        //        SessionCustom.Add("UserName", username, 100);
        //        this.Label1.Text = "<span class=s1>登录成功!<b>1</b>秒钟后将自动跳转...</span><script>setTimeout(function(){parent.closeWithIframe()},1000);</script>";
        //    }else
        //        this.Label1.Text = "<span class=s2>登录失败!</span>";
        //}
        //else
        //    this.Label1.Text = "<span class=s2>登录失败!</span>";
        //reader.Close();


    }
}
